Skip to content

Conversation

@waaake
Copy link
Contributor

@waaake waaake commented Dec 23, 2024

Description

This PR introduces a validation check to enhance the user experience by showing a warning popup when saving a file/template to a directory which is either not present or is not accessible to the user for writing to it.

Features list

  • Added warning dialog for user considering the accessibility of the directory for the user before saving to it.

Implementation remarks

Added an accessible helper to validate whether a given directory to save to is accessible for the user.
Updated the common validateFilepathForSave function to ensure the user has permission to save to the provided path.
This works in two ways, if either the directory the user is trying to save to does not exist it will return false, and the warning dialog shows up, or in case the user does not have access to writing to the directory also prompts the warning dialog.

Accessibility method helps identify whether a given save path directory is accessible for the user to write to.
File and template save as validation includes an access check to ensure that a given directory exists and the user has access for writing to it
@waaake waaake self-assigned this Dec 23, 2024
@codecov
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.90%. Comparing base (aeb77d8) to head (21b5080).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2625   +/-   ##
========================================
  Coverage    69.90%   69.90%           
========================================
  Files          121      121           
  Lines         7078     7078           
========================================
  Hits          4948     4948           
  Misses        2130     2130           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Dec 23, 2024
@cbentejac cbentejac merged commit faff99f into develop Dec 23, 2024
5 checks passed
@cbentejac cbentejac deleted the fix/validateSavePermissions branch December 23, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants